<?php
/**
 * Admin page System
 * หน้าแรกของ Admin
 * @package Adminsystem
 * @subpackage View
 * @category ChangePassword
 */
require('right_bar.php');
$x['AddTitle'] .= $this->lang->line('admin_system.title');

/* Load CSS */
$tmp = array('a:c:validationEngine.jquery', 'a:c:form_signup');
$x['AddHead'] .= $this->bee->AddCss($tmp);
unset($tmp);
// Load CSS
/* Load JavaScript */
$tmp = array('a:j:jquery.validationEngine-en', 'a:j:jquery.validationEngine');
$bf['AddFoot'] .= $this->bee->AddJava($tmp);
unset($tmp);
// Load JavaScript

$x['AddCss'] .= '
input[type=submit]{
    display: block;
    margin-left: 170px;
}';
$bf['AddHeadJquery'] .= '
    $(".form_blue").validationEngine();
    ';
$x['headlink'] = '';

$this->admin->view('_head', $x);
unset($x);
?>
<?php
$old_password = array(
    'name' => 'old_password',
    'id' => 'old_password',
    'value' => set_value('old_password'),
    'size' => 30,
);
$new_password = array(
    'name' => 'new_password',
    'id' => 'new_password',
    'maxlength' => $this->config->item('password_max_length', 'tank_auth'),
    'size' => 30,
);
$confirm_new_password = array(
    'name' => 'confirm_new_password',
    'id' => 'confirm_new_password',
    'maxlength' => $this->config->item('password_max_length', 'tank_auth'),
    'size' => 30,
);
?>
<p class="clean-yellow"><?php echo $this->lang->line('admin_system.changepass_detail'); ?></p>
<?php echo form_open($this->uri->uri_string(), 'class="form_blue"'); ?>

<label for="old_password"><?php echo $this->lang->line('admin_system.oldpass')?></label>        <input type="password" name="old_password" value="" id="old_password" size="30" class="validate[required,length[<?php echo $this->config->item('password_min_length', 'tank_auth') ?>,<?php echo $this->config->item('password_max_length', 'tank_auth') ?>]]" />   <?php echo form_error($old_password['name']); ?><?php echo isset($errors[$old_password['name']])?$errors[$old_password['name']]:''; ?>
<label for="new_password"><?php echo $this->lang->line('admin_system.newpass')?></label>        <input type="password" name="new_password" value="" id="new_password" maxlength="20" size="30" class="validate[required,length[<?php echo $this->config->item('password_min_length', 'tank_auth') ?>,<?php echo $this->config->item('password_max_length', 'tank_auth') ?>]]"  /><?php echo form_error($new_password['name']); ?><?php echo isset($errors[$new_password['name']])?$errors[$new_password['name']]:''; ?>
<label for="confirm_new_password"><?php echo $this->lang->line('admin_system.confirmpass')?></label>        <input type="password" name="confirm_new_password" value="" id="confirm_new_password" maxlength="20" size="30" class="validate[confirm[new_password],required,length[<?php echo $this->config->item('password_min_length', 'tank_auth') ?>,<?php echo $this->config->item('password_max_length', 'tank_auth') ?>]]"  /><?php echo form_error($confirm_new_password['name']); ?><?php echo isset($errors[$confirm_new_password['name']])?$errors[$confirm_new_password['name']]:''; ?>


<?php echo form_submit('change', 'Change Password'); ?>
<?php echo form_close(); ?>

<?php
$this->admin->view('_foot', $bf);
unset($bf);
?>